<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<head>
	<%@ include file="/common/taglibs.jsp"%>
	<title>用户管理</title>
	<%@ include file="/common/meta.jsp"%>
	<link href="${ctx}/assets/plugins/jquery-autoComplete/jquery.autocomplete.css" rel="stylesheet" />
</head>
<body>
    <!-- begin #page-loader -->
	<div id="page-loader" class="fade in"><span class="spinner"></span></div>
	<!-- end #page-loader -->
	
    <div id="page-container" class="fade page-sidebar-fixed page-header-fixed">
	
		<%@ include file="/common/header.jsp"%>
		<%@ include file="/common/slider.jsp"%>
		<div id="content" class="content">
		    <ol class="breadcrumb pull-right">
				<li><a href="javascript:;"><fmt:message key="sys.healthcervix"/></a></li>
				<li><a href="javascript:;">系统设置</a></li>
				<li class="active">用户管理</li>
			</ol>
			<h1 class="page-header">
				用户管理  <!-- <small><fmt:message key="sys.healthcervix"/></small> -->
			</h1>
			
			<div class="row">
				<!-- begin col-12 -->
				<div class="col-md-12">
					<div class="panel panel-inverse">
						<div class="panel-heading">
							<form class="form-horizontal" id="searchForm" name="searchForm">
								<div class="form-group">
									<div class="row">
									    <div class="col-md-3">
											<label class="col-md-3 control-label ui-sortable">姓名</label>
											<div class="col-md-8 ui-sortable">
												<input id="searchRealName" name="searchRealName" class="form-control" placeholder="请输入要查询的姓名" type="text" />
											</div>
										</div>
										<div class="col-md-3">
											<label class="col-md-3 control-label ui-sortable">账号</label>
											<div class="col-md-8 ui-sortable">
												<input id="searchUserName" name="searchUserName" class="form-control" placeholder="请输入要查询的账号" type="text" />
											</div>
										</div>
										<div class="col-md-3">
											<label class="col-md-3 control-label ui-sortable">工号</label>
											<div class="col-md-8 ui-sortable">
												<input id="searchUserNum" name="searchUserNum" class="form-control" placeholder="请输入要查询的工号" type="text" />
											</div>
										</div>
										
										<div class="col-md-3">
											<label class="col-md-3 control-label ui-sortable">电话</label>
											<div class="col-md-8 ui-sortable">
												<input id="searchPhone" name="searchPhone" class="form-control" placeholder="请输入要查询的电话" type="text" />
											</div>
										</div>
									</div>
								</div>
								<div class="form-group-bottom">	
									<div class="row">
										<div class="col-md-3">
											<label class="col-md-3 control-label ui-sortable">角色</label>
											<div class="col-md-8 ui-sortable">
												<select id="searchRole" name="searchRole" class="form-control">
													<option value="">请选择</option>
													<c:forEach var="role" items="${roles}">
														<option value="${role.id}">${role.name}</option>
													</c:forEach>
												</select>
											</div>
										</div>
										<div class="col-md-3">
											<label class="col-md-3 control-label ui-sortable">状态</label>
											<div class="col-md-8 ui-sortable">
												<select id="searchDisabled" name="searchDisabled" class="form-control">
													<option value=""><fmt:message key="public.select.choose"></fmt:message></option>
													<option value="0">启用</option>
													<option value="1">禁用</option>
												</select>
											</div>
										</div>
										<div class="col-md-3">
										</div>
										<div class="col-md-3">
											<shiro:hasPermission name="user:list:search">
												<button id="searchBtn" name="searchBtn" class="btn btn-success btn-sm m-r-5 m-b-5" title="<fmt:message key='public.button_search'/>">
												<fmt:message key="public.button_search"/></button>
												<button id="clearBtn" name="clearBtn" class="btn btn-danger btn-sm m-r-5 m-b-5" title="<fmt:message key='public.button_clear'/>">
												<fmt:message key="public.button_clear"/></button>
											</shiro:hasPermission>
										</div>
									</div>
								</div>
							</form>
						</div>
						<div class="panel-body">
	                        <p>
	                        	<shiro:hasPermission name="user:list:add">
	                       			<a id="addBtn" name="addBtn" href="javascript:;" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i>新增</a>
	                       		</shiro:hasPermission>
							</p>
							<table id="userListTable" class="table table-striped table-bordered table-hover">
								<thead>
									<tr>
										<th style="width:5%"><fmt:message key="public.list.index"/></th>
										<th style="width:12%">姓名</th>
										<th style="width:11%">账号</th>
										<th style="width:11%">工号</th>
										<th style="width:5%">性别</th>
										<th style="width:9%">电话</th>
										<th style="width:14%">地址</th>
										<th style="width:9%">角色</th>
										<th style="width:5%">状态</th>
										<th style="width:20%"><fmt:message key="public.list.operation"/></th>
									</tr>
								</thead>
								<tbody>
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
			
			<div class="modal fade" id="actDlg" name="actDlg">
				<div class="modal-dialog">
					<form id="actForm" name="actForm" action="#" class="form-horizontal">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
								<h4 class="modal-title"></h4>
							</div>
							<div class="modal-body">
									<!-- <div class="form-group" style="display:none" id="university">
				                        <label class="col-md-3 control-label ui-sortable">校区</label>
				                        <div class="col-md-9 ui-sortable">
				                            <input type="hidden" name="universityId" id="universityId"/>
											<input type="text"  id="university_name" class="form-control"    style="width: 80%"/>
				                        </div>
			                    	</div> -->
									<div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">账号<span class="required">*</span></label>
				                        <div class="col-md-9 ui-sortable">
				                            <input type="hidden" name="id" id="id"/>
											<input type="hidden" name="isDel" id="isDel"/>
											<input type="text" name="userName" id="userName" class="form-control"  maxlength="50"  style="width: 80%"/>
				                        </div>
			                    	</div>
			                    	<div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">真实姓名<span class="required">*</span></label>
				                        <div class="col-md-9 ui-sortable">
				                        	<input type="text" name="realName" id="realName" class="form-control"  maxlength="50" style="width: 80%"/>
				                        </div>
				                    </div>
				                    <div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">工号<span class="required">*</span></label>
				                        <div class="col-md-9 ui-sortable">
											<input type="text" name="userNum" class="form-control"  maxlength="50" style="width: 80%"/>
				                        </div>
			                    	</div>
			                    	<div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">性别<span class="required">*</span></label>
				                        <div class="col-md-9 ui-sortable">
											<input type="radio" name="sex" value="1" checked="checked"/>男
				                        	<input type="radio" name="sex" value="0"/>女
				                        </div>
			                    	</div>
			                    	<div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">电话&nbsp;&nbsp;</label>
				                        <div class="col-md-9 ui-sortable">
											<input type="text" name="phone" id="phone" class="form-control"  maxlength="20"
											onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();"
											style="width: 80%"/>
				                        </div>
			                    	</div>
			                    	<div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">邮箱&nbsp;&nbsp;</label>
				                        <div class="col-md-9 ui-sortable">
											<input type="text" name="email" id="email" class="form-control"  maxlength="100"  style="width: 80%"/>
				                        </div>
			                    	</div>
			                    	<div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">地址&nbsp;&nbsp;</label>
				                        <div class="col-md-9 ui-sortable">
											<input type="text" name="address" id="address" class="form-control" maxlength="500"   style="width: 80%"/>
				                        </div>
			                    	</div>
				                    <div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">是否禁用<span class="required">*</span></label>
				                        <div class="col-md-9 ui-sortable">
				                        	<select id="disabled" name="disabled" class="form-control"  style="width: 80%" >
				                        		<option value="0">启用</option>
				                        		<option value="1">禁用</option>
				                        	</select>
				                        </div>
				                    </div>
				                    <div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">角色<span class="required">*</span></label>
				                        <div class="col-md-9 ui-sortable">
				                        	<select id="roleId" name="roleId" class="form-control"  style="width: 80%" >
				                        		<option value="">请选择</option>
												<c:forEach var="role" items="${roles}">
													<option value="${role.id}">${role.name}</option>
												</c:forEach>
				                        	</select>
				                        </div>
				                    </div>
				                    <div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">组织机构<span class="required">*</span></label>
				                        <div class="col-md-9 ui-sortable">
				                        	<select id="groupId" name="groupId" class="form-control"  style="width: 80%" >
				                        		<option value="">请选择</option>
												<c:forEach var="group" items="${groups}">
													<option value="${group.id}">${group.name}</option>
												</c:forEach>
				                        	</select>
				                        </div>
				                    </div>
				                    <div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">职位级别<span class="required">*</span></label>
				                        <div class="col-md-9 ui-sortable">
				                        	<select id="positionLevel" name="positionLevel" class="form-control"  style="width: 80%" >
				                        		<option value="">请选择</option>
				                        		<option value="A">A</option>
				                        		<option value="B">B</option>
				                        		<option value="C">C</option>
				                        		<option value="D">D</option>
				                        		<option value="E">E</option>
				                        		<option value="F">F</option>
				                        	</select>
				                        </div>
				                    </div>
							</div>
							<div class="modal-footer-dialog">
								<a href="javascript:;" class="btn btn-sm btn-default" data-dismiss="modal"><fmt:message key="public.button_close"/></a>
								<button type="button" class="btn btn-sm btn-primary" id="actFormBtn"><fmt:message key="public.button_save"/></button>
							</div>
						</div>
					</form>
				</div>
			</div>
			
			<div class="modal fade" id="editPasswordDlg"  name="editPasswordDlg">
				<div class="modal-dialog">
					<form id="editPasswordForm" name="editPasswordForm" action="#" class="form-horizontal">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
								<h4 class="modal-title"><span id="userEditPasswordTitle"></span></h4>
							</div>
							<div class="modal-body">
									<input type="hidden" name="id" id="id"/>
			                    	<div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">密码<span id="urlrequired" class="required">*</span></label>
				                        <div class="col-md-9 ui-sortable">
				                        	<input type="password" name="password" id="password" class="form-control"  style="width: 80%"/>
				                        </div>
				                    </div>
				                    <div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">确认密码<span class="required">*</span></label>
				                        <div class="col-md-9 ui-sortable">
				                        	<input type="password" name="repassword" id="repassword" class="form-control"   style="width: 80%"/>
				                        </div>
				                    </div>
							</div>
							<div class="modal-footer-dialog">
								<a href="javascript:;" class="btn btn-sm btn-default" data-dismiss="modal"><fmt:message key="public.button_close"/></a>
								<button type="button" class="btn btn-sm btn-primary" id="editPasswordFormBtn"><fmt:message key="public.button_save"/></button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<!-- END PAGE -->    
	</div>
	<%@ include file="/common/footer.jsp" %>
	<script src="${ctx}/assets/js/jquery.dataTables.js"></script>
	<script src="${ctx}/assets/js/DT_bootstrap.js"></script>
	<script src="${ctx}/assets/plugins/jquery-autoComplete/jquery.autocomplete.js"></script>
	<script type="text/javascript" src="${ctx}/js/user/list.js?v=${ver}"></script> 
	<script type="text/javascript">
		jQuery(document).ready(function() {       
			UserManaged.init();
		});
	</script>
</body>
</html>